package cn.yunyichina.reservation.util;

import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import java.util.Map;

/**
 * Created by Lullaby on 2016/9/3.
 */
public class XMLUtil {

    public static String buildMapXML(Map<String, String> params) {
        Element xml = DocumentHelper.createElement("xml");
        for (Map.Entry<String, String> entry : params.entrySet()) {
            xml.addElement(entry.getKey()).addCDATA(entry.getValue());
        }
        return xml.asXML();
    }

}
